from deck import Deck
from random import randint
class Player(object):
    def __init__(self, name=None, ID=None, score=0):
        self.name = name
        if self.name==None:
            self.name="Guest%d"%randint(1,2000)
        
        self.ID = ID
        if self.ID==None:
            self.ID=randint(1,2000)
        self.score = score
        self.hDeck = Deck("Hazard")
        self.aDeck = Deck("Action")
        self.connection=None
    def setConnection(self, con):
        self.connection=con

    def __str__(self):
        return self.__repr__()
    def __repr__(self):
        return "Player: %s (%d) has score %d and has decks\n\t %s\n\t %s"%(self.name,self.ID, self.score,self.hDeck, self.aDeck)





if __name__ == "__main__":
    #name = ("Michael")
   # ID = ("2")
   # score = ("1")
    #print name, ID, score
##    player = Player("4",3)
##    player2 = Player("James",1337)
##    print player
##    print player2
    players = [Player("Mike",8008135),Player("James",1337)]
    for i in players: print i
